package com.qingxin.wuye.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;

/**
 * WyGarden entity. 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wy_garden")
public class WyGarden extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 8735314372986859561L;
	private String gardenid;
	private WyPropertyCompany wyPropertyCompany;
	private String gardenCode;
	private String gardenName;
	private String address;
	private String leader;
	private String linkman;
	private String phone;
	private Integer roomNum;
	private Integer multilayerNum;
	private Integer highriseNum;
	private BigDecimal area;
	private BigDecimal buildingArea;
	private BigDecimal publicArea;
	private BigDecimal greenArea;
	private BigDecimal roadArea;
	private BigDecimal carportDesignArea;
	private BigDecimal carportArea;
	private Integer carportNum;
	private String remark;
	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;
	private String cityid;
	
	private Set<WyBuilding> wyBuildings = new HashSet<WyBuilding>(0);

	// Constructors

	/** default constructor */
	public WyGarden() {
	}

	public WyGarden(String gardenid) {
		this.gardenid = gardenid;
	}

	public WyGarden(String gardenid, String gardenName) {
		this.gardenid = gardenid;
		this.gardenName = gardenName;
	}

	/** full constructor */
	public WyGarden(WyPropertyCompany wyPropertyCompany, String gardenCode,
			String gardenName, String address, String leader, String linkman,
			String phone, Integer roomNum, Integer multilayerNum,
			Integer highriseNum, BigDecimal area, BigDecimal buildingArea,
			BigDecimal publicArea, BigDecimal greenArea, BigDecimal roadArea,
			BigDecimal carportDesignArea, BigDecimal carportArea, Integer carportNum,
			String remark, String createBy, Date createTime,
			String updateBy, Date updateTime, String cityid, Set<WyBuilding> wyBuildings) {
		this.wyPropertyCompany = wyPropertyCompany;
		this.gardenCode = gardenCode;
		this.gardenName = gardenName;
		this.address = address;
		this.leader = leader;
		this.linkman = linkman;
		this.phone = phone;
		this.roomNum = roomNum;
		this.multilayerNum = multilayerNum;
		this.highriseNum = highriseNum;
		this.area = area;
		this.buildingArea = buildingArea;
		this.publicArea = publicArea;
		this.greenArea = greenArea;
		this.roadArea = roadArea;
		this.carportDesignArea = carportDesignArea;
		this.carportArea = carportArea;
		this.carportNum = carportNum;
		this.remark = remark;
		this.createBy = createBy;
		this.createTime = createTime;
		this.updateBy = updateBy;
		this.updateTime = updateTime;
		this.cityid = cityid;
		this.wyBuildings = wyBuildings;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "gardenid", unique = true, nullable = false, length = 32)
	public String getGardenid() {
		return this.gardenid;
	}

	public void setGardenid(String gardenid) {
		this.gardenid = gardenid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "companyid")
	@JsonIgnore
	public WyPropertyCompany getWyPropertyCompany() {
		return this.wyPropertyCompany;
	}

	public void setWyPropertyCompany(WyPropertyCompany wyPropertyCompany) {
		this.wyPropertyCompany = wyPropertyCompany;
	}

	@Column(name = "garden_code", length = 50)
	public String getGardenCode() {
		return this.gardenCode;
	}

	public void setGardenCode(String gardenCode) {
		this.gardenCode = gardenCode;
	}

	@Column(name = "garden_name", length = 100)
	public String getGardenName() {
		return this.gardenName;
	}

	public void setGardenName(String gardenName) {
		this.gardenName = gardenName;
	}

	@Column(name = "address", length = 500)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "leader", length = 50)
	public String getLeader() {
		return this.leader;
	}

	public void setLeader(String leader) {
		this.leader = leader;
	}

	@Column(name = "linkman", length = 50)
	public String getLinkman() {
		return this.linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	@Column(name = "phone", length = 50)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "room_num")
	public Integer getRoomNum() {
		return this.roomNum;
	}

	public void setRoomNum(Integer roomNum) {
		this.roomNum = roomNum;
	}

	@Column(name = "multilayer_num")
	public Integer getMultilayerNum() {
		return this.multilayerNum;
	}

	public void setMultilayerNum(Integer multilayerNum) {
		this.multilayerNum = multilayerNum;
	}

	@Column(name = "highrise_num")
	public Integer getHighriseNum() {
		return this.highriseNum;
	}

	public void setHighriseNum(Integer highriseNum) {
		this.highriseNum = highriseNum;
	}

	@Column(name = "area", precision = 12, scale = 2)
	public BigDecimal getArea() {
		return this.area;
	}

	public void setArea(BigDecimal area) {
		this.area = area;
	}

	@Column(name = "building_area", precision = 12, scale = 2)
	public BigDecimal getBuildingArea() {
		return this.buildingArea;
	}

	public void setBuildingArea(BigDecimal buildingArea) {
		this.buildingArea = buildingArea;
	}

	@Column(name = "public_area", precision = 12, scale = 2)
	public BigDecimal getPublicArea() {
		return this.publicArea;
	}

	public void setPublicArea(BigDecimal publicArea) {
		this.publicArea = publicArea;
	}

	@Column(name = "green_area", precision = 12, scale = 2)
	public BigDecimal getGreenArea() {
		return this.greenArea;
	}

	public void setGreenArea(BigDecimal greenArea) {
		this.greenArea = greenArea;
	}

	@Column(name = "road_area", precision = 12, scale = 2)
	public BigDecimal getRoadArea() {
		return this.roadArea;
	}

	public void setRoadArea(BigDecimal roadArea) {
		this.roadArea = roadArea;
	}

	@Column(name = "carport_design_area", precision = 12, scale = 2)
	public BigDecimal getCarportDesignArea() {
		return this.carportDesignArea;
	}

	public void setCarportDesignArea(BigDecimal carportDesignArea) {
		this.carportDesignArea = carportDesignArea;
	}

	@Column(name = "carport_area", precision = 12, scale = 2)
	public BigDecimal getCarportArea() {
		return this.carportArea;
	}

	public void setCarportArea(BigDecimal carportArea) {
		this.carportArea = carportArea;
	}

	@Column(name = "carport_num")
	public Integer getCarportNum() {
		return this.carportNum;
	}

	public void setCarportNum(Integer carportNum) {
		this.carportNum = carportNum;
	}

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "create_by", length = 50)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_by", length = 50)
	public String getUpdateBy() {
		return this.updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "update_time", length = 23)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "cityid", length = 32)
	public String getCityid() {
		return cityid;
	}

	public void setCityid(String cityid) {
		this.cityid = cityid;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "wyGarden")
	@JsonIgnore
	public Set<WyBuilding> getWyBuildings() {
		return this.wyBuildings;
	}

	public void setWyBuildings(Set<WyBuilding> wyBuildings) {
		this.wyBuildings = wyBuildings;
	}

}